<?php
require_once 'head.php';
require_once 'model/article.php';
require_once("foot.php");

$cache=false;
$smar=new MySmarty($cache,$cachetime,$moban);
$smarty=$smar->get_smarty();

$smarty->assign("webname",$webname);
$smarty->assign("description",$art['description']);
$smarty->assign("keywords",$art['keywords']);
$smarty->assign("website",$website);
$smarty->assign("searchkeys",$searchkeys);
$smarty->assign("newshops",$newshops);
$smarty->assign("toubiao",$show_topnav);
$smarty->assign("moban",$moban);
$smarty->assign("thispid",$thispid);
$smarty->assign("navcount",$art['navcount']);
$smarty->assign("art_postfix",$art['postfix']); //文章系统后缀名
//foot
$smarty->assign("links",$links);
$smarty->assign("jiathis",$jiathis);

$smarty->assign("QQ",$QQ);
$smarty->assign("ICP",$ICP);
$smarty->assign("tongji",$tongji);
$smarty->assign("jiathis",$jiathis);
$smarty->assign("ads",$ads);

doclick($_GET['id']);
$arti=get_field_by_id('article','catalog,filename,id','id',$_GET['id']);
$str='/'.get_catalog_path($arti['catalog']);  //例: /fushi/
if($arti['filename']){
	$str.=$arti['filename'];                  //例: /fushi/myarticle.htm
}else{
	$a=doquery($arti['catalog']);
	$a=$a['folder'];
	$str.=$a.$arti['id'].$art['postfix'];            //例: /fushi/nvzhuang123.htm
}

$html=$smarty->fetch("showarticle.html",null, null, false);
$smarty->MakeHtmlFile(".".$str,$html); //生成html
//$smarty->display("showarticle.html");
?>